from django.db import models
from dingxiang.utils.models import BaseModel


# Create your models here.


# 导航模型
class NavModel(BaseModel):
    POSITION_CHOICE = (
        (0, '顶部'),
        (1, '底部'),
    )

    link = models.CharField(max_length=255, verbose_name='链接地址')
    is_http = models.BooleanField(default=False, verbose_name='是否为外部链接')
    position = models.IntegerField(choices=POSITION_CHOICE, default=0, verbose_name='位置')

    class Meta:
        db_table = 'dx_nav'

        verbose_name_plural = '导航菜单'
